extend  ../layout 

block content
	.container
		.row 
			.col-md-7
				//- video(src="#{movie.flash}", controls poster="#{movie.poster}" allowFullScreen="true",quality="high",width="600",height="400",align="center")
				<iframe width="750" height="420" src="#{movie.flash}" poster="#{movie.poster}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
			.col-md-5
				dl.dl-horizontal
					dt 电影名字 
					dd= movie.title 
					dt 导演 
					dd= movie.doctor 
					dt 国家 
					dd= movie.country 
					dt 语言 
					dd= movie.language 
					dt 上映年份 
					dd= movie.year 
					dt 简介 
					dd= movie.summary 
		.row
			.col-md-12
				.panel.panel-success
					.panel-heading
						h3 评论区
					.panel-body
						if comments && comments.length > 0
							ul.media-list
								each item in comments
									li.media
										.pull-left
											a.comment(href="#comments", data-cid="#{item._id}", data-tid="#{item.from._id}")
												img.img-thumbnail.media-object(src="",style="width:64px;height:64px")
										.media-body
											h4.media-heading #{item.from.name}
											p #{item.content}
											if item.reply && item.reply.length > 0
												each reply in item.reply
													.media
														.pull-left
															a.comment(href="#comments", data-cid="#{item._id}", data-tid="#{reply.from._id}")
																img.img-thumbnail.media-object(src="",style="width:64px;height:64px")
														.media-body
															h4.media-heading 
																| #{reply.from.name}
																span.text-info &nbsp;回复&nbsp;
																| #{reply.to.name}：
															p #{reply.content}

						else
							p 该影片还没有评论,赶快来评论一下,抢占沙发吧!
					hr
			#comments
				form#commentForm(action="/user/comment", method="post", style="margin-bottom:120px")
					input(type="hidden", name="comment[movie]", value="#{movie._id}")
					if user
						input(type="hidden", name="comment[from]", value="#{user._id}")
					.form-group
						textarea.form-control(name="comment[content]", rows="3")
					if user
						button.btn.btn-primary(type="submit") 提交
					else
						a.navbar-link(href='#', data-toggle='modal', data-target='#signinModal') 登录后评论	

	script(src="/js/detail.js")		
		